#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
#import <AipOcrSdk/AipOcrSdk.h>
#import "IQKeyboardManager.h"
#import "YSLocationManager.h"
@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [self registerBaiduOCR];
    [self configKeyboard];
  [GeneratedPluginRegistrant registerWithRegistry:self];
  // Override point for customization after application launch.
  return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
///注册百度身份证识别
- (void)registerBaiduOCR{
    [[AipOcrService shardService] authWithAK:@"gAd6UvlyHLyzETlNV636O0EP" andSK:@"HiIEKoN7tOZU2FxLEAakdgL2JkZ8ZNuB"];
}
///配置键盘
- (void)configKeyboard{
    [[IQKeyboardManager sharedManager] setShouldResignOnTouchOutside:YES];
    IQKeyboardManager.sharedManager.toolbarDoneBarButtonItemText = @"完成";
}
///获取用户定位城市
- (void)getUserLoctionCity{
    [[YSLocationManager sharedManager] getLocationDidFinishBlock:^(YSLocationManagerModel *model) {
        [[NSUserDefaults standardUserDefaults] setObject:model.locality forKey:@"userLoctionLocality"];
    } errorBolck:^(NSError *error) {
        
    }];
}

@end
